<!DOCTYPE html>
<html>
<head>
  <title></title>
</head>
<body>
  <div id="app">
    <counter></counter>
    <counter></counter>
    <counter></counter>
    <button @click="inc">increment</button>
  </div>
  <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
  <script>
    const state = new Vue({
      data: {
        count: 0
      },
      methods: {
        increase() {
          this.count++;
        }
      }
    });

    const Counter = {
      render(h) {
        return h('div', state.count);
      }
    };

    new Vue({
      el: '#app',
      components: { Counter },
      methods: {
        inc() {
          state.increase();
        }
      }
    });
  </script>
</body>
</html>
